package com.queue.receiver;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import com.queue.config.TopicConfig;

/**
* @comments
* @author  zg
* @date 2018年11月11日
*/
@Component
public class TopicMsgReceiver {

	@RabbitListener(queues = TopicConfig.topic_queue_1)
	public void rcv1(String obj) {
		System.out.println(TopicConfig.topic_queue_1 + " received:" + obj);
	}

	@RabbitListener(queues = TopicConfig.topic_queue_2)
	public void rcv2(String obj) {
		System.out.println(TopicConfig.topic_queue_2 + " received:" + obj);
	}

}
